<?php 
	echo "
	<div class='lp1 pad15' style = 'background: none; '>
		<div class='bpad15' id = 'calcContainer' style = ''>
			<div style = 'position: relative'>
				<div id = 'calcResultContainer' style = 'position: absolute; top: 100px; left: 370px; font-size: 100px; '>
					
				</div>
			</div>";
	
//	echo Language::Get('Profit calculator');
			
	echo '<form action = "#" method = "POST" id = "calcForm" onsubmit = "if (ValidateCalc()) { $(\'#btnCalc\').hide(); $(\'#loaderImage\').show(); '.jQuery::Post('/clients/calculate/', 'calcForm', 'AfterCalc').'} return false; ">';
	echo "
    	<table cellpadding='0' cellspacing='0' style = 'margin-bottom: 3px; '>
        	<tr class='' name = 'staticRow'>
            	<td align='left' class='tpad5 bpad5'><span class='c6a'>".Language::Get('Account type').": </span></td>
          	</tr>
          	<tr class='lp1' name = 'inputRow' style = ''>
		    	<td colspan='2' class='bpad10 dq-input-text'>";
		    		XHTML::Select('account_type', $this->data['account_types'], false, false, array('style' => 'border: 0px; width: 140px;'));
	echo "		</td>
		  	</tr>
        	<tr class='' name = 'staticRow'>
            	<td align='left' class='tpad5 bpad5'><span class='c6a'>".Language::Get('Followers account type').": </span></td>
          	</tr>
          	<tr class='lp1' name = 'inputRow' style = ''>
		    	<td colspan='2' class='bpad10 dq-input-text'>";
		    		XHTML::Select('follower_account_type', $this->data['account_types'], false, false, array('style' => 'border: 0px; width: 140px;'));
	echo "		</td>
		  	</tr>
        	<tr class='' name = 'staticRow'>
            	<td align='left' class='tpad5 bpad5'><span class='c6a'>".Language::Get('Total number of followers').": </span></td>
          	</tr>
          	<tr class='lp1' name = 'inputRow' style = ''>
		    	<td colspan='2' class='bpad10 dq-input-text'>";
		    		XHTML::InputText('followers_number', '', array('style' => 'width: 100%'));
	echo "		</td>
		  	</tr>
        	<tr class='' name = 'staticRow'>
            	<td align='left' class='tpad5 bpad5'><span class='c6a'>".Language::Get('Total number of referrals').": </span></td>
          	</tr>
          	<tr class='lp1' name = 'inputRow' style = ''>
		    	<td colspan='2' class='bpad10 dq-input-text' style = ''>";
		    		XHTML::InputText('referrals_number', '', array('style' => 'width: 100%'));
	echo "		</td>
		  	</tr>
		</table>
        </form>
        <div id='btnCalc' style = 'width: 120px; margin-left: 22px; '>".Language::Get('Calculate', 'CAPITALIZE')."</div>
	";
	XHTML::Img(SITE_IMAGES.'loader16x16.gif', 'alt', array('id' => 'loaderImage', 'style' => 'display: none; margin-left: 75px; margin-top: 10px; '));
	
	echo "</div>
	</div>";
?>

<script type="text/javascript">
	$('#btnCalc').dqButton({type:5, action:"$('#calcForm').submit();", clickType:'js', live: false});
	$('#calcContainer .btnType-5-left').addClass('btnType-5-left-select');	
	$('#calcContainer .btnType-5-center').addClass('btnType-5-center-select');	
	$('#calcContainer .btnType-5-right').addClass('btnType-5-right-select');	
	$('#calcContainer .dq-input-text').dqInput();

	//validates calc form
	function ValidateCalc()
	{
//		if (($('[name=support_question]').val() == '') || ($('[name=support_details]').val() == '') || ($('[name=support_name]').val() == '') || 
//			($('[name=support_email]').val() == ''))
//		{
//			alert('Please, fill all the required fields');
//			return false;
//		}
//		else
//		{
			return true;
//		}
	}

	//after calc
	function AfterCalc(data)
	{
		$('#loaderImage').hide();
		$('#btnCalc').show();
//		$('#calcResult').html(data);
		$('#calcResultContainer').html("<span id = 'calcResult'>" + data + "</span><span style = 'color: green; '>$</span>");	
	}
</script>